home *** CD-ROM | disk | FTP | other *** search
Text File | 1997-11-11 | 1.5 KB | 57 lines | [TEXT/MPS ] |
- #
- # File: NameRevisionCurrent
- #
- # Contains: Script that creates a namerevision of the files currently checked
- # out on this machine. Different from NameRevisions, which always
- # applies the namerevision to the newest files in the project, which
- # could be different if someone else checks in some new files.
- #
- # Usage:
- #
- # NameRevisionCurrent ProjectName "New revision name"
- #
- # Requires Lurkers v1.6 or later
- #
- # Written by: Greg Anderson
- #
- # Copyright: © 1994 by Apple Computer, Inc., all rights reserved.
- #
- # Change History (most recent first):
- #
- # <1> 6/8/94 ga first checked in
- #
- #
-
- #
- # We always expect two parameters
- #
- if {#} ≠ 2
- echo "### NameRevisoinCurrent ProjectName RevisionName"
- exit 1
- end
-
- set ProjectName "{1}"
- set RevisionName "{2}"
-
- Set OldExit {Exit}
-
- #
- # We must explicitly iterate over the subprojects of the specified project
- # name, because NameRevisions -r just doesn't work right if you specify
- # the exact set of files to include in the revision
- #
- for subproject in `projectinfo -project "{ProjectName}" -r -s -only`
- #
- # Find the folder that files from this project are checked out into
- #
- if "`CheckOutDir -project "{subproject}"`" =~ /CheckOutDir -project ≈∫ (≈)®1/
- #
- # Use 'Lurkers' to find out the revision number of the currently checked
- # out files in this directory
- #
- Set RequestDir "{®1}"
- NameRevisions -project "{subproject}" "{{RevisionName}}" -replace `Lurkers -insomeproject -rev -s "{RequestDir}"`
- end
- end
-
- Set Exit {OldExit}